import axios from '@/utils/request';

import config from '@/common/config'

let base = config.getMkBasePath();

/**
 * 卡券投放表
 *1    默认只开放普通查询，所有查询，只要上传	 分页参数 {currentPage:当前页码从1开始,pageSize:每页记录数,total:总记录【数如果是0后台会自动计算总记录数非0不会自动计算】}，后台都会自动按分页查询 其它 api用到再打开，没用到的api请注释掉，
 *2 查询、新增、修改的参数格式  params={id:'主键 主键',refuseReason:'审核不通过原因',thirdPartyName:'weixin微信会员卡、zhifubao支付宝会员卡',flowStatus:'投放结果0失败1成功',cardPkId:'卡主键',deptid:'投放部门',sendTime:'投放日期',sendUserid:'投放人',sendType:'投放方式0门店投放1公众号投入2小程序投入9其它',sendSubType:'01卡券二维码02卡券门店二维码03摇一摇周边04微信连wifi',cardId:'微信卡主键'}
 **/
 
//普通查询 条件之间and关系  
export const listSend = params => { return axios.get(`${base}/mk/mng/card/send/list`, { params: params }); };
//查询关注用户
export const listUser= params => { return axios.get(`${base}/mk/mng/card/send/listUser`, { params: params }); };
//模糊查询卡券投放表 条件之间or关系  
//export const listSendKey = params => { return axios.get(`${base}/mk/mng/card/send/listKey`, { params: params }); };

//删除一条卡券投放表 params={id:'主键 主键'}
export const delSend = params => { return axios.post(`${base}/mk/mng/card/send/del`,params); };

//批量删除卡券投放表  params=[{id:'主键 主键'}]
export const batchDelSend = params => { return axios.post(`${base}/mk/mng/card/send/batchDel`, params); };

//修改一条卡券投放表记录
export const editSend = params => { return axios.post(`${base}/mk/mng/card/send/edit`, params); };

//新增一条卡券投放表
export const addSend = params => { return axios.post(`${base}/mk/mng/card/send/add`, params); };